Home |
| Latest | About | Random
# 06a Further understanding: Fields and other scalars of choice. So far when we mention the word "scalars" we mean "numbers" in general. But what numbers are we referring to? In this class, most of the time "scalars" refers to real numbers, or maybe even complex numbers. But there are other choice of "scalars", or "number systems" here that would make linear algebra work. Specifically what we want as scalars is something called a **field**. It has quite a few axioms, a field is a number system $F$ with binary operations $+$ (addition) and $\cdot$ (multiplication) on it. Sometimes multiplication is written just by juxtaposition. And these operations on $F$ satisfy the following: - (1) $F$ is closed under addition: If $x,y\in F$, then so is $x+y \in F$ - (2) $F$ is closed under multiplication: If $x,y \in F$, then so is $x\cdot y \in F$ - (3) Addition is commutative and associative. - (4) Multiplication is commutative and associative. - (5) There exists an element called $0 \in F$ that serves as the additive identity, namely $x + 0 = x$ for all $x\in F$. - (6) There exists an element called $1 \in F$ that serves as the multiplicative identity, namely, $1\cdot x = x$ for all $x \in F$. - (7) For every element $x \in F$, it has an additive inverse, namely an element $-x \in F$, where $x+(-x) =0$. - (8) For every element $x\in F$, where $x \neq 0$, it has a multiplicative inverse, namely there exists an element $x^{-1} = \frac{1}{x} \in F$, where $xx^{-1}=1$. - (9) Multiplication is distributive over addition, namely $x\cdot(y+z)=x\cdot y + x\cdot z$. Wow, ok I know that looks like a lot, but the set of real numbers $\mathbb{R}$ form a field, and one can (painstakingly) check that the set of real numbers satisfy all of the above. Similarly, the set of complex numbers $\mathbb{C}$ also forms a field. These fields can serve as the scalars of choice to do linear algebra. Here is an example that is not a field: The set of integers $\mathbb{Z}$. Can you think about why? Hint: Does every integer has a multiplicative inverse, that is also an integer? There are some other interesting number systems that form a field, and hence can used in linear algebra, besides $\mathbb{R}$ or $\mathbb{C}$. I will illustrate a few specifically, and generalize (mildly). Example. The field $\mathbb{Z} / 2 \mathbb{Z} = \{0,1\}$. You can read $\mathbb{Z} / 2 \mathbb{Z}$ as "zee mod two zee". This is essentially integers modulo 2. How does this number system work? In this number system, there are only two numbers, 0 and 1. And this is their addition table and multiplication table: $$ \begin{array}{c|cc} + & 0 & 1 \\ \hline 0 & 0 & 1 \\ 1 & 1 & 0 \end{array}\qquad \begin{array}{c|cc} \cdot & 0 & 1 \\ \hline 0 & 0 & 0 \\ 1 & 0 & 1 \end{array} $$With these operations, $\mathbb{Z} / 2 \mathbb{Z}$ forms a field, and we can use it as a the scalars of choice, and do linear algebra! Example. The field $\mathbb{Z} / 3 \mathbb{Z} = \{0,1,2\}$ You can read $\mathbb{Z} / 3 \mathbb{Z}$ as "zee mod three zee". This is essentially integers modulo 3. How does this number system work? In this number system there are three numbers, 0, 1, and 2. And this is their addition table and multiplication table: $$ \begin{array}{c|ccc} + & 0 & 1 & 2 \\ \hline 0 & 0 & 1 & 2 \\ 1 & 1 & 2 & 0 \\ 2 & 2 & 0 & 1 \end{array}\qquad \begin{array}{c|ccc} \cdot & 0 & 1 & 2 \\ \hline 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 2 \\ 2 & 0 & 2 & 1 \end{array} $$It may look weird at first, but what is happening is you perform addition and multiplication as usual, but if it is 3 or more you do a "clockwork arithmetic", where you take the result and divide by 3, and whatever the remainder is, it is your answer. So $2\times2$ normally gives 4, and since it has remainder of 1 when you divide by 3, in this $\mathbb{Z}/3\mathbb{Z}$ world, $2\times 2=1$. Similarly $2+2=1$ in this $\mathbb{Z} / 3\mathbb{Z}$ world! Let us take a look at the number $1$ in this field $\mathbb{Z} / 3 \mathbb{Z}$. Notice that $1 + 2 = 0$. So this suggests that $-1 = 2$ and $-2 = 1$ in this world! What about division? Well to figure out what $\frac{1}{2}$ is in this $\mathbb{Z} / 3\mathbb{Z}$ world, we ask: Ok, if we say $\frac{1}{2} = x$, then what is $x$? We need $1=2x$. So we look at the multiplication table: Observe that in our table $2\cdot2=1$, so this means $\frac{1}{2} = 2$ in $\mathbb{Z}/3\mathbb{Z}$! Isn't this neat? We can generalize it to the following. As it turns out this works for any prime $p$, we can make the field $\mathbb{Z} / p\mathbb{Z} = \{0,1,\ldots,p-1\}$ in a similar way. Where how addition works is you take $x+y$ and calculate its result first normally like integers, then divide by $p$ and take the remainder as the answer. Similarly for multiplication: Take the product $xy$, and then divide by $p$ and take the remainder as the answer. For example, for the prime number $p=13$, we can consider the field $\mathbb{Z} / 13 \mathbb{Z}=\{0,1,2,3,4,5,6,7,8,9,10,11,12\}$. And in this field, we have for example $$ \begin{array}{} 7+9 = 3 \pmod{13}\\ 5+10 = 2 \pmod{13}\\ 6\cdot 6 =10 \pmod{13}\\ 7\cdot 3 = 8 \pmod{13}\\ -5 = 8 \pmod{13} \\ -2 = 11\pmod{13} \\ \text{...etc} \end{array} $$Here we write $\pmod{13}$ at the end of each line to remind ourselves that we take the remainder after dividing by 13 at the end. To figure out division is a bit tougher, for example what would $\frac{3}{11}$ be in $\mathbb{Z} / \mathbb{13 Z}$ ? Well we need to look for some $x$ such that $3 = 11x$ in this field $\mathbb{Z} / \mathbb{13 Z}$, that is we need a number where when multiplied to $11$ we get $3$ as a remainder after dividing by $13$. Perhaps we can just guess: Here are the multiples of $11$, and its remainder after dividing by 13: $$ \begin{array}{} 11\cdot 1&=11 \pmod{13}\\ 11\cdot 2&=9 \pmod{13}\\ 11\cdot 3 & =7\pmod{13} \\ 11\cdot 4 & =5\pmod{13} \\ 11\cdot 5 & = 3 \pmod{13} \\ \vdots \end{array} $$Oh wait! Here we see that $11\cdot 5 = 3 \pmod{13}$, hence $\frac{3}{11} = 5 \pmod{13}$! Wow! This isn't the best way to do division (especially when the modulus $p$ is large), one typically employs something called Euclidean algorithm (or more precisely the extended Euclidean algorithm), which can be formulated as -- you guessed it -- linear algebra! But ok, that's enough digression for now. Bottom line is this: When we say scalars, in this class we typically refer to the reals $\mathbb{R}$ or maybe the complex numbers $\mathbb{C}$. But there are other scalars of choice to do linear algebra. These scalars need to form a **field** (whose axioms listed above), and they can be kind of wild. In particular these field $\mathbb{Z} / p\mathbb{Z}$ when $p$ is a prime number is a **finite field**, a number system with finitely many numbers! **Remark**. These are not the only finite fields, as one would prove in a basic abstract algebra math course that all finite fields are of the form $\mathbb{Z} / p^{k} \mathbb{Z}$, for some prime $p$, some positive integer $k$. But to construct these we need to use polynomials. And then there are even more exotic infinite fields with various properties, where cool math happens... ANYWAY. Just thought you might want to know! Ok, we will next see how different fields of numbers are our scalars affect solving system of linear equations. We won't do too much of it, most of the time we will stick with reals or complex, but it is interesting to see briefly.